#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
using namespace std;

#include <iostream>
#include <cstring>
using namespace std;

bool vis[100][26] = { false };
string s;

bool check(int left, int right)
{
    while (left < right)
    {
        int i = 0;
        for (i = 0; i < 26; i++)
        {
            if (vis[left][i] && vis[right][i])
            {
                break;
            }
        }
        if (i == 26)
        {
            return false;
        }
        else
        {
            left++; right--;
        }
    }
    return true;
}
int main()
{
    int n;
    cin >> n;
    while (n--)
    {
        int m;
        cin >> m;
        memset(vis, 0, sizeof vis);
        for (int i = 0; i < m; i++)
        {
            cin >> s;
            for (auto ch : s)
            {
                vis[i][ch - 'a'] = true;
            }
        }
        int left = 0, right = m - 1;
        if (check(left, right)) cout << "Yes" << endl;
        else cout << "No" << endl;
    }

    return 0;
}